body {
  overflow-y: scroll;
}

canvas {
  border: 1px solid #ccc;
  background-color: #fff;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  margin-top: 5px;
  margin-bottom: 5px;
}

.navbar-nav > li {
  float: left;
}
.navbar-nav > li > a {
  padding-top: 15px;
  padding-bottom: 15px;
}
.navbar-nav {
  float: left;
  margin: 0;
}

.btn-file {
  position: relative;
  overflow: hidden;
}

.btn-file input[type="file"] {
  position: absolute;
  top: 0;
  right: 0;
  min-width: 100%;
  min-height: 100%;
  font-size: 100px;
  text-align: right;
  filter: alpha(opacity=0);
  opacity: 0;
  outline: none;
  background: white;
  cursor: inherit;
  display: block;
}

.form-control {
  background-color: #ffffff;
  border-color: #cccccc;
}
.form-control[disabled] {
  background-color: #eeeeee;
  border-color: #cccccc;
}

td {
  border: 1px solid #ccc;
  vertical-align: middle;
  padding: 2px;
}

td:nth-child(3) {
  width: 280px;
}

#loading {
  width: 642px;
  height: 362px;
  overflow: hidden;
  position: absolute;
  text-align: center;
}

#preview {
  display: block;
  cursor: default;
}

#image_url_lge {
  width: 250px;
  vertical-align: middle;
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center center;
}

.error {
  color: #f44336;
}

.success {
  color: #4caf50;
}

.invisible {
  visibility: hidden;
}

.hidden {
  display: none;
}

.result {
  transition: all 0.1s ease-out;
  cursor: pointer;
}

.result .text,
.result .thumb {
  display: inline-block;
}

.result .thumb {
  float: right;
}
.result > div::after {
  content: " ";
  display: block;
  height: 0;
  clear: both;
}

#results-list .nav > li > a {
  padding: 8px;
  border-radius: 0;
}

#results-list .nav-pills > li.active {
  background-color: #eee;
  color: #333;
}

.result .title {
  color: #2196f3;
}

.result .ep {
  color: #f44336;
}

.result .time {
  color: #4caf50;
}

.result .similarity {
  color: #607d8b;
  font-size: 12px;
}

.result .file {
  color: #9e9e9e;
  font-size: 8px;
}

.noselect {
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  -khtml-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

#progressBarControl {
  top: -5px;
  visibility: hidden;
}
#fileNameDisplay {
  position: absolute;
  font-size: 10px;
  margin-top: 10px;
}
#timeCodeDisplay {
  position: absolute;
  right: 16px;
  font-size: 10px;
  margin-top: 10px;
}

#main,
#results-list,
#info {
  display: inline-block;
  margin: 10px;
  margin: 10px;
}
#main {
  position: relative;
  width: 642px;
  margin-bottom: 1em;
  background-color: #ffffff;
  color: #333;
  box-shadow: 1px 1px 10px rgba(0, 0, 0, 0.3);
  font-family: Helvetica, Arial, Meiryo, "Microsoft JhengHei", "Microsoft YaHei",
    sans-serif;
}

#form {
  padding: 1em;
  display: inline-block;
  width: 100%;
}

#main .btn.disabled,
#main .btn[disabled] {
  cursor: default !important;
}

#results-list {
  float: left;
  width: 642px;
  background-color: #ffffff;
  color: #333;
  box-shadow: 1px 1px 10px rgba(0, 0, 0, 0.3);
  font-family: Helvetica, Arial, Meiryo, "Microsoft JhengHei", "Microsoft YaHei",
    sans-serif;
}

@media (min-width: 1020px) {
  #results-list {
    width: 320px;
  }
  .result .thumb {
    float: none;
  }
}

#results-list #controls {
  padding: 10px;
  text-align: center;
}

#results-list #controls.checkbox {
  margin: 0;
}

#results-list #status {
  text-align: center;
}

#info {
  float: left;
  width: 642px;
  z-index: 6;
  background-color: #ffffff;
  color: #333;
  box-shadow: 1px 1px 10px rgba(0, 0, 0, 0.3);
  display: none;
  visibility: hidden;
  opacity: 0;
  transition: visibility 100ms ease-out, opacity 100ms ease-out !important;
  font-size: 0.9em;
  line-height: 1.5em;
  padding: 1em;
  font-family: Helvetica, Arial, Meiryo, "Microsoft JhengHei", "Microsoft YaHei",
    sans-serif;
}

#info #naturalText,
#info #table {
  display: block;
  max-width: 320px;
}

#info #table {
  margin-top: 10px;
}

#info #ranking {
  width: 100%;
}

#info #ranking a {
  text-decoration: none;
}

#info #ranking .no-sort {
  cursor: pointer;
  border-bottom: 1px solid #666;
}

#info h3 {
  font-size: 16px;
}

#info h2 {
  font-family: Helvetica, Arial, Meiryo, "Microsoft JhengHei", "Microsoft YaHei",
    sans-serif;
  font-size: 12px;
}

#info h1 {
  font-size: 18px;
}

#info #poster {
  display: block;
  min-width: 225px;
  max-width: 225px;
  min-height: 320px;
  float: right;
}

#info img {
  display: block;
}

#info table td {
  padding: 3px;
}

#info #table td:first-child {
  min-width: 60px;
}

#info a:hover {
  text-decoration: underline;
}

#info #staff {
  min-width: 60%;
  max-width: 100%;
}

#info #staff td {
  width: 50%;
  vertical-align: middle;
}

#info .character {
  float: left;
  height: 150px;
  width: 50%;
  margin: 8px 0;
}

#info .character > div {
  float: left;
  display: table;
  height: 100%;
}

#info .character > div:last-child {
  width: 135px;
}

#info .character > div div {
  display: table-cell;
  vertical-align: middle;
}

#info .character > div:first-child div {
  width: 100px;
  height: 150px;
  background-position: 50% 0;
  background-size: cover;
  background-repeat: no-repeat;
}

#info .character > div:last-child div {
  padding: 10px;
  text-align: center;
}

.ripple {
  position: relative;
  left: -80px;
  top: -220px;
  box-sizing: content-box;
  display: block;
  border-style: double;
  border-radius: 800px;
  animation: ripple 1s cubic-bezier(0, 0, 0.2, 1);
  animation-iteration-count: infinite;
}

@keyframes ripple {
  0% {
    width: 0px;
    height: 0px;
    transform: translate(350px, 350px);
    border-width: 50px;
    border-color: #ffffff;
    opacity: 1;
  }
  100% {
    width: 800px;
    height: 800px;
    transform: translate(0px, 0px);
    border-width: 0;
    border-color: #0000ff;
    opacity: 0;
  }
}
.spinning {
  animation: spin 2s infinite linear;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(1turn);
  }
}

@media (prefers-color-scheme: dark) {
  canvas {
    border: 1px solid #333;
    background-color: #151520;
  }
  .form-control {
    background-color: #000000;
    border-color: #333333;
  }
  .form-control[disabled] {
    background-color: #333333;
    border-color: #333333;
  }
  td {
    border: 1px solid #333;
  }
  #results-list .nav-pills > li.active > a,
  #results-list .nav-pills > li.active > a:focus,
  #results-list .nav-pills > li.active > a:hover {
    background-color: #eee;
    color: #333;
  }
  #main {
    background-color: #151520;
    color: #ffffff;
    box-shadow: 1px 1px 10px rgba(255, 255, 255, 0.3);
  }
  #results-list {
    background-color: #151520;
    color: #ffffff;
    box-shadow: 1px 1px 10px rgba(255, 255, 255, 0.3);
  }
  #info {
    background-color: #151520;
    color: #ffffff;
    box-shadow: 1px 1px 10px rgba(255, 255, 255, 0.3);
  }
}
